package com.study.modules.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.study.modules.sys.model.dto.SysUserDTO;
import com.study.modules.sys.model.entity.SysUser;

/**
 * @Author Mr.Du
 * @Date 2021/10/16 10:49
 */
public interface SysUserService extends IService<SysUser> {

    IPage<SysUserDTO> selectUserList(String status, Page<SysUser> page);

    SysUser selectUserByLoginName(String loginName);

    SysUser selectUserById(Long id);

    Boolean insert(SysUserDTO sysUser);

    Boolean updateByWeb(SysUserDTO sysUser, Long userId);

    Boolean resetPassword(Long userId, Long operatorId);

    Boolean updatePsd(String oldPassword, String newPassword, Long userId);

    Boolean disableUser(Long userId, Integer status, Long operatorId);

    Boolean delete(Long userId, Long operatorId);

    SysUser selectPsdSaltById(Long userId);

    SysUser selectPsdSaltByLoginName(String loginName);

    SysUserDTO selectUserInfo(Long userId);

}
